package com.m3958.logcollector.config;

import java.time.Instant;
import java.util.concurrent.atomic.AtomicLong;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

@Component
public class InfoInMemory implements InitializingBean {
    
    private long startTimeStamp;
    
    private AtomicLong receivedItems;

    @Override
    public void afterPropertiesSet() throws Exception {
        setStartTimeStamp(Instant.now().toEpochMilli());
    }

    public long getStartTimeStamp() {
        return startTimeStamp;
    }

    public void setStartTimeStamp(long startTimeStamp) {
        this.startTimeStamp = startTimeStamp;
    }


    public AtomicLong getReceivedItems() {
        return receivedItems;
    }

    public void setReceivedItems(AtomicLong receivedItems) {
        this.receivedItems = receivedItems;
    }
}
